package com.linzelin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class IndexController {

    @RequestMapping("/xxx")
    public String hello(Model model){
        model.addAttribute("msg","<h1>test</h1>");
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        model.addAttribute("lists",list);
        System.out.println(model);
        return "test";
    }
}
